<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8" />
<title>会员管理 - 详细资料</title>
<?php include($this->c['_homes']['_viewsHome'].'/_global/_head.php');?>
</head>
<!-- BEGIN BODY -->
<body class="page-header-fixed page-sidebar-fixed">
<!-- BEGIN HEADER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/head.php');?>
<!-- END HEADER -->
<div class="clearfix"></div>
<!-- BEGIN CONTAINER -->
<div class="page-container" > 
  <!-- BEGIN HORIZONTAL MENU PAGE SIDEBAR1 -->
  <?php include($this->c['_homes']['_viewsHome'].'/_global/menu.php');?>
  <!-- END BEGIN HORIZONTAL MENU PAGE SIDEBAR --> 
  <!-- BEGIN PAGE -->
  <div class="page-content"> 
    <!-- BEGIN PAGE HEADER-->
    <div class="row">
      <div class="col-md-12"> 
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title"> 详细资料 </h3>
        <ul class="page-breadcrumb breadcrumb">
          <li> <i class="icon-home"></i> <a href="/manage">后台</a> <i class="icon-angle-right"></i> </li>
          <li> 会员管理 <i class="icon-angle-right"></i> </li>
          <li> <a href="/member/memberlist">会员列表</a> <i class="icon-angle-right"></i> </li>
          <li>详细资料</li>
        </ul>
        <!-- END PAGE TITLE & BREADCRUMB--> 
      </div>
    </div>
    <!-- END PAGE HEADER--> 
    <!-- BEGIN PAGE CONTENT-->
    
    <div class="row">
      <div class="col-md-9"> 
        <!-- BEGIN SAMPLE FORM PORTLET-->
        <div class="portlet box blue">
          <div class="portlet-title">
            <div class="caption"> <i class="icon-reorder"></i> 会员资料 </div>
            <div class="tools"> <a href="" class="collapse"></a> </div>
          </div>
          <div class="portlet-body form">
            <form method="post" class="form-horizontal" action="#">
              <div class="form-body">
                <?php
                if ($this->data['data']) {
                    foreach ($this->data['data'] as $k => $r) {
                ?>
                <div class="form-group">
                  <label class="col-md-3 control-label">UID</label>
                  <div class="col-md-9">
                    <h4>
                      <?=$r['uid'];?>
                    </h4>
                  </div>
                </div>
                <hr>
                <div class="form-group">
                  <label class="col-md-3 control-label">昵称</label>
                  <div class="col-md-9">
                    <h5>
                      <?=$r['realname'];?>
                    </h5>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-md-3 control-label">头像</label>
                  <div class="col-md-9">
                    <h5><?php
                        $headimgurl = '/style/assets/img/avatar.png';
                        if($r['headimgurl'])
                        {
                            $headimgurl = $r['headimgurl'];
                        }
                        elseif($r['wechat_headimgurl']!="")
                        {
                            $headimgurl = $r['wechat_headimgurl'];
                        }
                        ?><img src="<?=$headimgurl;?>" width="45" height="45" />   
                    </h5>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-md-3 control-label">所属门店</label>
                  <div class="col-md-9">
                    <h5>
                    <?=$this->store['name']?>                      
                    </h5>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-md-3 control-label">手机号码</label>
                  <div class="col-md-9">
                    <h5><?=$r['mobile'];?></h5>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-md-3 control-label">推荐人</label>
                  <div class="col-md-9">
                    <h5><?=$r['pid']> 0 && $this->data['parents'][$r['pid']] ? '['.$r['pid'].'] <a href="?pid='.$r['pid'].'">'.$this->data['parents'][$r['pid']].'</a>' : '--';?></h5>
                  </div>
                </div>
                 <div class="form-group">
                  <label class="col-md-3 control-label">推荐人数</label>
                  <div class="col-md-9">
                    <h5><?=$this->data['child'][$r['uid']] >0 ?$this->data['child'][$r['uid']]: 0;?>人</h5>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-md-3 control-label">性别</label>
                  <div class="col-md-9">
                    <h5><?
                    if($this->data['wechat']['sex']==1) echo '男';
                    elseif($this->data['wechat']['sex']==2) echo '女';
                    else echo '未知';
                    ?></h5>
                  </div>
                </div>

                <div class="form-group">
                  <label class="col-md-3 control-label">注册时间</label>
                  <div class="col-md-9">
                    <h5><?=date("Y-m-d H:i", $r['create_time']);?></h5>
                  </div>
                </div>
                
                <hr>
                <div class="form-group">
                  <label class="col-md-3 control-label">会员级别</label>
                  <div class="col-md-4">
                    <h5><?=$this->c['member_level'][$r['member_level']];?>
                  </h5>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-md-3 control-label">会员开通时间</label>
                  <div class="col-md-9">
                    <h5>
                     <?=$r['level_time']>0 ? date("Y-m-d",$r['level_time']) : '--'?>
                    </h5>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-md-3 control-label">会员到期时间</label>
                  <div class="col-md-9">
                    <h5>
                      <? if($r['level_past_time']>0) echo date("Y-m-d",$r['level_past_time']);
                      else echo '--';
                      ?>
                    </h5>
                  </div>
                </div>
                <hr>
                <div class="form-group">
                  <label class="col-md-3 control-label">累积消费</label>
                  <div class="col-md-9">
                    <h5><?=$this->data['amount'][$r['uid']] > 0 ? $this->data['amount'][$r['uid']] : 0;?></h5>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-md-3 control-label">可用余额</label>
                  <div class="col-md-9">
                    <h5><?=$this->data['balance'][$r['uid']]['money'] > 0 ? $this->data['balance'][$r['uid']]['money'] : 0;?></h5>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-md-3 control-label">抽奖积分</label>
                  <div class="col-md-9">
                    <h5><?=$this->data['balance'][$r['uid']]['commission_jifen'] ? $this->data['balance'][$r['uid']]['commission_jifen'] : 0;?></h5>
                  </div>
                </div>                
                <hr>
                <div class="form-group">
                  <label class="col-md-3 control-label">状态</label>
                  <div class="col-md-9">
                    <?=$this->c['stat']['normal'][$r['stat'] ];?>
                  </div>
                </div>
                <hr>
                <div class="form-group">
                  <label class="col-md-1 control-label"></label>
                  <div class="col-md-offset-3 col-md-9">
                    <a href="/order/olist?uid=<?=$r['uid'];?>" class="btn blue">查看订单</a>
                    <a href="/member/collection?uid=<?=$r['uid'];?>" class="btn blue">查看收藏</a>
                    <a href="/member/history?uid=<?=$r['uid'];?>" class="btn blue">查看足迹</a>
                    <a href="/finance/finance_detail?uid=<?=$r['uid'];?>" class="btn blue">资金明细</a>
                  </div>
                </div>
              </div>
              <?php
                  }
              }
              ?>
              <div class="form-actions fluid">
                <div class="col-md-offset-3 col-md-9">
                  <button type="button" class="btn blue" onClick="history.back(1);">返回</button>
                </div>
              </div>
            </form>
          </div>
        </div>
        <!-- END SAMPLE FORM PORTLET--> 
        
      </div>
    </div>
    <!-- END PAGE CONTENT--> 
  </div>
  <!-- END PAGE --> 
</div>
<!-- END CONTAINER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/_footer.php');?>
<script>
jQuery(document).ready(function() {    
   App.init();   
});
</script> 
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>